home *** CD-ROM | disk | FTP | other *** search
- /* Very simple program , with floating point */
-
- /*
-
- This program is simple, but it demonstrates the following :
- 1. integer and floating point arithmetic
- 2. global data initialization
- 3. inclusion of standard header files
- 4. call of a Toolbox trap
-
- */
-
- #include <osutils.h>
- #include <types.h>
-
- double x = 100;
- double ss;
- char y;
-
- int main()
- {
- int p;
- int j;
- ss = 3.14;
- x = x * 3.14;
- j = x / ss;
- j /= 25;
- y=j;
- while (y--)
- SysBeep(1);
- return j;
- }
-